﻿<%@ Page Language="C#"  MasterPageFile="~/Wap/Web/WebSite.master" AutoEventWireup="true" CodeBehind="LbsShopDisplay.aspx.cs" Inherits="ZLCMS.Web.Wap.Web.LbsShopDisplay" %>


<%@ Import Namespace="ZLCMS.Business.Util" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
<style type="text/css">
#allmap {width: 100%;height: 300px;margin:2px;}
</style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="header" runat="server">
<div data-role="header">
    <h1> <%=WxShop.ShopName%></h1>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">

<div data-role="main" class="ui-content">
<div id="allmap"></div>
 <div class="ui-body ui-body-a ui-corner-all">
          <p>电话：<a href="tel:<%=WxShop.ShopPhone%>"><%=WxShop.ShopPhone%></a></p>
          <p>地址：<%=WxShop.ShopAddress%></p>
      </div>
<%if (!string.IsNullOrEmpty(WxShop.Content))
  { %>
    <p>
                <%=WxShop.Content%></p>
<%} %>
<script type="text/javascript">

    // 百度地图API功能
    var map = new BMap.Map("allmap");
    //map.centerAndZoom(new BMap.Point(<%=WxShop.Longitude %>, <%=WxShop.Latitude %>), 11);

    var p1 = new BMap.Point(<%=Request["lng"] %>, <%=Request["lat"] %>);
    var p2 = new BMap.Point(<%=WxShop.Longitude %>, <%=WxShop.Latitude %>);

    var driving = new BMap.DrivingRoute(map, { renderOptions: { map: map, autoViewport: true} });
    driving.search(p1, p2);
</script>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="footer" runat="server">
</asp:Content>
